<template>
    <div class="app-container">
        <!-- 补贴单信息 -->
        <h5 class="titleInfo">
            补贴单信息
        </h5>
        <el-form ref="list1" :inline="true" :model="list1" label-width="150px">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="补贴单号">
                        <span class="spanToInput">{{list1.nickName | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="医院名称">
                        <span class="spanToInput">{{list1.username | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="项目名称">
                        <span class="spanToInput">{{list1.username | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="报单时间">
                        <span class="spanToInput">{{list1.username | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="消费金额">
                        <span class="spanToInput">{{list1.realname | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="退款金额">
                        <span class="spanToInput">{{list1.sex | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="剩余金额(消费金额)">
                        <span class="spanToInput">{{list1.sex | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="补贴金额">
                        <span class="spanToInput">{{list1.realname | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="退款金额">
                        <span class="spanToInput">{{list1.sex | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="剩余金额(补贴金额)">
                        <span class="spanToInput">{{list1.sex | filterNull}}</span>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="退款金额">
                        <el-input></el-input>    
                    </el-form-item>
                    <el-button type="primary" plain>计算</el-button>   
                </el-col>
            </el-row>
        </el-form>
        <!-- 抵扣积分 -->
        <div class="divBar"></div>
        <h5 class="titleInfo">
            抵扣积分
        </h5>
        <el-form ref="list1" :inline="true" :model="list1" label-width="150px">
            <div class="divTable">
                <el-table :data="tableData" border>
                    <el-table-column
                        align="center"
                        prop="date"
                        label="订单号">
                    </el-table-column>
                    <el-table-column
                        align="center"
                        prop="name"
                        label="积分类型">
                    </el-table-column>
                    <el-table-column
                        align="center"
                        prop="name"
                        label="原数量">
                    </el-table-column>
                    <el-table-column
                        align="center"
                        prop="name"
                        label="退还数量">
                    </el-table-column>
                    <el-table-column
                        align="center"
                        prop="name"
                        label="剩余数量">
                    </el-table-column>
                </el-table>
            </div>
        </el-form>
        <!-- 额度 -->
        <div class="divBar"></div>
        <h5 class="titleInfo">
            额度
        </h5>
        <el-form ref="list1" :inline="true" :model="list1" label-width="150px">
            <div class="divTable">
                <el-table :data="tableData" border>
                    <el-table-column
                        align="center"
                        prop="date"
                        label="补贴单原总共">
                    </el-table-column>
                    <el-table-column
                        align="center"
                        prop="name"
                        label="退款">
                    </el-table-column>
                    <el-table-column
                        align="center"
                        prop="name"
                        label="剩余">
                    </el-table-column>
                    <el-table-column
                        align="center"
                        prop="name"
                        label="已释放">
                    </el-table-column>
                    <el-table-column
                        align="center"
                        prop="name"
                        label="退款已释放消费">
                    </el-table-column>
                    <el-table-column
                        align="center"
                        prop="name"
                        label="剩余已释放消费">
                    </el-table-column>
                    <el-table-column
                        align="center"
                        prop="name"
                        label="已发放提现">
                    </el-table-column>
                    <el-table-column
                        align="center"
                        prop="name"
                        label="退款已发放提现">
                    </el-table-column>
                    <el-table-column
                        align="center"
                        prop="name"
                        label="剩余已发放提现">
                    </el-table-column>
                </el-table>
            </div>
        </el-form>
        <!-- 消费积分 -->
        <div class="divBar"></div>
        <h5 class="titleInfo">
            消费积分
        </h5>
        <div class="divTable">
            <el-table :data="tableData" border>
                <el-table-column
                    align="center"
                    prop="date"
                    label="补贴单原总共">
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="name"
                    label="退款">
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="name"
                    label="原剩余">
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="name"
                    label="账户原有">
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="name"
                    label="退款的">
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="name"
                    label="剩余的">
                </el-table-column>
            </el-table>
        </div>
        <!-- 业绩奖励 -->
        <div class="divBar"></div>
        <h5 class="titleInfo">
            业绩奖励
        </h5>
        <div class="divTable">
            <el-table :data="tableData1" border>
                <el-table-column
                    align="center"
                    prop="acc"
                    label="奖励类型">
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="name"
                    label="姓名">
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="name"
                    label="电话">
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="name"
                    label="角色">
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="name"
                    label="奖励金额">
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="name"
                    label="退款金额">
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="name"
                    label="剩余金额">
                </el-table-column>
            </el-table>
        </div>
        <el-row>
            <el-col :span="24">
                <el-button style="margin-top:30px;margin-left:130px;margin-bottom:30px" type="primary" @click="dialogAudit=true" >立即提交</el-button>
            </el-col>
        </el-row>
    </div>
</template>
<script>
    import { vipInfo } from '@/api/vipInfo' 
    export default {
        name:"subsidyManageRefund",
        data(){
            return {
                val:"1",
                userId:"",
                list1:{},
                list2:[],
                list3:{},
                tableData: [{
                    date: '2016-05-02',
                    name: '王小虎'
                }],
                tableData1: [{
                    date: '2016-05-02',
                    name: '王小虎'
                },{
                    date: '2016-05-02',
                    name: '王小虎'
                },{
                    date: '2016-05-02',
                    name: '王小虎'
                },{
                    date: '2016-05-02',
                    name: '王小虎'
                },{
                    date: '2016-05-02',
                    name: '王小虎'
                },{
                    date: '2016-05-02',
                    name: '王小虎'
                },{
                    date: '2016-05-02',
                    name: '王小虎'
                }],
                tableTD:[
                    "一级业绩奖励退款",
                    "二级业绩奖励退款",
                    "团队奖励退款",
                    "大区域市奖励退款",
                    "二单奖励退款",
                    "分公司奖励退款",
                    "试用奖励退款"
                ]
            }
        },
        filters:{
            filterNull(e) {
                if(!e){
                    return "暂无"
                }else{
                    return e
                }
            },
            cardNull(e){
                return window.helper.cardType(e)
            },
            userFocus(e){
                return window.helper.userFocus(e)
            }
        },
        mounted(){
            let t= this 
            this.tableTD.map((e,index)=>{
                t.tableData1[index]["acc"] = t.tableTD[index]
            })
            this.userId = Number(this.$route.query.userId)
            this.getList()
        },
        methods:{
            //审批取消
            auditClose(){
                this.dialogAudit = false
                console.log("审核取消")
            },
            //审批确定
            auditSubmit(){
                this.dialogAudit = false
                console.log("审批确定")
            },
            getList(){
                let datas = {userId:this.userId}
                // vipInfo(datas).then().then(res =>{
                //     console.log(res)
                //     if(!res.data.code){
                //         if(res.data.data.user){
                //             this.list1 = res.data.data.user
                //         }
                //         if(res.data.data.bankCard){
                //             this.list2 = res.data.data.bankCard
                //         }
                //         if(res.data.data.userExtra){
                //             this.list3 = res.data.data.userExtra
                //         }
                //     }else{
                //         this.$message.error("数据接口访问失败");
                //     }
                // })
                // .catch(error =>{
                //     this.$message.error(error);
                // })
            }
        }
    }
</script>

<style scoped>
    .app-container{padding: 0px!important}
    .form{margin-left: 268px}
    .divTable{padding: 0 20px 20px 20px;}
</style>